{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a5c2f9a8",
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "import torch.nn as nn\n",
    "import torch.optim as optim\n",
    "from torch.utils.data import DataLoader\n",
    "import torchvision.transforms as transforms\n",
    "from torchvision.datasets import ImageFolder\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from tqdm import tqdm\n",
    "import os\n",
    "from PIL import Image\n",
    "import platform\n",
    "from utils import *\n",
    "import cv2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "de336ad6",
   "metadata": {},
   "outputs": [],
   "source": [
    "source = r\"D:\\desktop\\class\\DataSet\\animals_labeled\\raw\\butterflys\"\n",
    "target = r\"D:\\desktop\\class\\DataSet\\animals_labeled\\grey\\butterflys\"\n",
    "convert_color_to_grayscale(source, target)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40d9451e",
   "metadata": {},
   "outputs": [],
   "source": [
    "source = r\"D:\\desktop\\class\\DataSet\\animals_labeled\\grey\\butterflys\"\n",
    "target = r\"D:\\desktop\\class\\DataSet\\three\\train\\butterflys\"\n",
    "crop_to_square_center(source, target)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "07940017",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
